package com.snake.springboot.authority.service.event;

import com.snake.springboot.authority.api.model.AccountInfoModel;
import org.snake.common.security.jwt.AccountInfo;
import org.springframework.context.ApplicationEvent;

/**
 * 类 {@code AccountIdentifyEvent}  <br> .
 * <p>用户鉴权事件
 * 创建时间：2024/6/3 16:40
 *
 * @author Yzhui
 * @see
 */
public class AccountIdentifyEvent extends ApplicationEvent {

    private String accountId;

    private Integer type;

    private AccountInfoModel result;

    public AccountIdentifyEvent(Object source) {
        super(source);
    }

    public AccountIdentifyEvent(Object source, String accountId, Integer type) {
        super(source);
        this.accountId = accountId;
        this.type = type;
    }

    public AccountInfoModel getResult() {
        return result;
    }

    public void setResult(AccountInfoModel result) {
        this.result = result;
    }

    public String getAccountId() {
        return accountId;
    }

    public void setAccountId(String accountId) {
        this.accountId = accountId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Override
    public String toString() {
        return "AccountIdentifyEvent{" +
                "accountId='" + accountId + '\'' +
                ", type=" + type +
                ", source=" + source +
                "} " + super.toString();
    }
}
